package com.service;

import java.util.List;

import com.entity.New;
import com.entity.page.Page;
import com.entity.vo.NewVo;
import com.exception.DaoException;

public interface NewService {

	/**
	 * 查询主题对应的新闻
	 * @param tid
	 * @return
	 * @throws DaoException
	 */
	List<New> selectNewsByTid(Integer tid) throws DaoException;
	
	/**
	 * 分页查询新闻
	 * @param page
	 * @param row
	 * @return
	 * @throws DaoException
	 */
	Page<New> selectNewsByPage(Integer page,Integer row,NewVo newVo) throws DaoException;
	
	/**
	 * 查询新闻总数
	 * @return
	 * @throws DaoException
	 */
	int selectNewsCount() throws DaoException;


	/**
	 * 查询新闻根据新闻的id
	 * @param id
	 * @return
	 * @throws DaoException
	 */
	New selectNewById(Integer id) throws DaoException;
	
	/**
	 * 存储新闻图片
	 * @param id
	 * @param imgPath
	 * @return
	 * @throws DaoException
	 */
	boolean updateNewByImage(Integer id,String imgPath) throws DaoException;
}
